<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div class="col-sm-3 col-md-2 sidebar">
    <div class="top-navigation">
        <div class="t-menu">MENU</div>
        <div class="t-img">
            <img src="/static/images/lines.png" alt=""/>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="drop-navigation drop-navigation">
        <ul id="ul_nav" class="nav nav-sidebar">
            <c:forEach items="${functionInfos}" var="functionInfo" varStatus="status">
                <%--<shiro:hasPermission name="${functionInfo.functionIdentity}">--%>
                    <li class="files">
                        <a href="${functionInfo.functionPath}" class="menu">
                            <em class="${functionInfo.iconClass}" aria-hidden="true"></em>
                                ${functionInfo.functionName}
                            <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
                        </a>
                        <c:if test="${functionInfo.subFunctionInfoVo != null }">
                            <ul class="cl-effect-1">
                                <c:forEach items="${functionInfo.subFunctionInfoVo}" var="subFunctionInfo">
                                    <%--<shiro:hasPermission name="${subFunctionInfo.functionIdentity}">--%>
                                        <li>
                                            <a href="${subFunctionInfo.functionPath}">
                                                <span>${subFunctionInfo.functionName}</span>
                                            </a>
                                        </li>
                                    <%--</shiro:hasPermission>--%>
                                </c:forEach>
                            </ul>
                        </c:if>
                    </li>
                <%--</shiro:hasPermission>--%>
            </c:forEach>
        </ul>
    </div>
</div>

<script>
    $(document).ready(function () {
        $("li a.menu").click(function () {
            $(this).next("ul.cl-effect-1").slideToggle(300, function () {
                if ($(this).css("display") == "none") {

                }
            });
        });
    })
</script>
